class AddFormatToQuestion < ActiveRecord::Migration
  def self.up
    add_column :questions, :format, :string, :null => false
    Question.all.each do |question|
      question.update_attribute(:format, Question::FORMATS[:text])
    end
  end

  def self.down
    remove_column :questions, :format
  end
end
